package routers

import (
	beego "github.com/beego/beego/v2/server/web"
	"news/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	beego.Router("/add", &controllers.NewsControllers{}, "post:Add")

	beego.Router("/login", &controllers.LoginControllers{}, "post:Login")

	beego.Router("/del", &controllers.NewsControllers{}, "get:Del")

	beego.Router("/list", &controllers.NewsControllers{}, "get:List")

	beego.Router("/update", &controllers.NewsControllers{}, "post:Update")

	beego.Router("/page", &controllers.NewsControllers{}, "get:Page")

}
